package com.ruoyi.youtian.service;


import com.ruoyi.gzmx_scdw.domain.Gzmx_scdw;
import com.ruoyi.gzmx_scdw.domain.Gzmx_scdwVo;
import com.ruoyi.gzmx_scdw.domain.ZtreeNew;
import com.ruoyi.youtian.domain.ScdwSceneVo;
import com.ruoyi.youtian.domain.TSceneCategory;
import com.ruoyi.youtian.domain.TSceneCategoryTreeSelect;
import com.ruoyi.youtian.domain.TreeSelect;
import com.ruoyi.youtian.domain.vo.ScenePointVo;
import com.ruoyi.youtian.domain.vo.SourceTagVo;
import com.ruoyi.youtian.domain.vo.TSceneCategoryAssignEquipmentVo;

import java.util.HashMap;
import java.util.List;

/**
 * 场景Service接口
 *
 * @author ruoyi
 * @date 2022-09-12
 */
public interface ITSceneCategoryService
{
    /**
     * 查询场景
     *
     * @param sceneId 场景主键
     * @return 场景
     */
    public TSceneCategory selectTSceneCategoryBySceneId(Long sceneId);

    /**
     * 查询场景列表
     *
     * @param tSceneCategory 场景
     * @return 场景集合
     */
    public List<TSceneCategory> selectTSceneCategoryList(TSceneCategory tSceneCategory);

    /**
     * 新增场景
     *
     * @param tSceneCategory 场景
     * @return 结果
     */
    public int insertTSceneCategory(TSceneCategory tSceneCategory);

    /**
     * 修改场景
     *
     * @param tSceneCategory 场景
     * @return 结果
     */
    public int updateTSceneCategory(TSceneCategory tSceneCategory);

    /**
     * 删除场景信息
     *
     * @param sceneId 场景主键
     * @return 结果
     */
    public int deleteTSceneCategoryBySceneId(Long sceneId, String updateBy);

    /**
     * 查询场景类型树
     *
     * @param tSceneCategory
     * @return
     */
    public List<TSceneCategoryTreeSelect> selectTSceneCategoryTreeList(TSceneCategory tSceneCategory );

    public List<ZtreeNew> selectTSceneCategoryZtreeList(TSceneCategory tSceneCategory);

    /**
     * 查询场景类型树
     *
     * @param tSceneCategory
     * @return
     */
    public List<TSceneCategoryTreeSelect> selectTSceneCategoryTreeList(TSceneCategory tSceneCategory, List<Gzmx_scdwVo> gzmx_scdwVoList );


    public List<TSceneCategoryTreeSelect> buildTWorkspaceCategoryTreeSelect2(List<TSceneCategory> list, List<Gzmx_scdwVo> gzmx_scdwVoList);

    /**
     *  构建场景类型结构树
     * @param list
     * @return
     */
    public List<TSceneCategory> buildTSceneCategoryTree(List<TSceneCategory> list);


    /**
     *
     * @param list
     * @return
     */
    public List<TSceneCategoryTreeSelect> buildTWorkspaceCategoryTreeSelect(List<TSceneCategory> list);


    /**
     *  为场景分配设备
     * @return
     */
    public int assignEquipmentAdd(TSceneCategoryAssignEquipmentVo scenceCategory);

    /**
     *  为场景分配设备
     * @return
     */
    public int assignEquipmentDel(TSceneCategoryAssignEquipmentVo scenceCategory);

    /**
     * 场景Id
     * @param tSceneCategoryId
     * @return
     */
    public List<Long> getChildTSceneCategoryIdList(long tSceneCategoryId);



    public List<ScenePointVo> selectScenePointVoListBySceneIdList(List<Long> sceneCategoryIdList, String pointName, String sceneName);

    /**
     * 监测某点历史记录值
     * @return
     */
    public List<SourceTagVo> selectSourceTagHistoryListBySourceTag(SourceTagVo sourceTagVo);

    /**
     *
     * 查询某场景下所有检测点实时值
     * @param sceneId
     * @return
     */
    public List<SourceTagVo> selectSourceTagListBySceneId(Long sceneId);



    /**
     * 查询某监测点的
     * @param sceneId
     * @return
     */
    public List<TSceneCategory>  getChildCategoryList(Long sceneId);

    /**
     * 场景监测列表
     * @param sceneId
     * @return
     */
    public List<HashMap> getSceneCategoryMonitorList(Long sceneId);

    /**
     *  首页统计
     * @return
     */
    public List<HashMap> getSceneCategoryMonitorListAll();

    /**
     * 场景管理左侧树
     * @param scdwSceneVo
     * @return
     */
    public List<TreeSelect> selectScdwSceneTreeList(ScdwSceneVo scdwSceneVo,List<TreeSelect> scdwTreeList);

    List<TSceneCategory> selectTSceneCategoryreoList(TSceneCategory tScenceCategory);


    /**
     * 查询场景列表
     *
     * @param tSceneCategory 场景
     * @return 场景集合
     */
    public List<TSceneCategory> selectTTTTSceneCategoryList(TSceneCategory tSceneCategory);


    public List<ScenePointVo> selectScenePointVoListBySceneIdListreo(ScenePointVo scenePointVo);
}
